aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/routes/(main)/(public)/reset-password/[id]
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/src/routes/(main)/(public)/reset-password/[id]')
-rw-r--r--code/app/src/routes/(main)/(public)/reset-password/[id]/+page.server.ts10
-rw-r--r--code/app/src/routes/(main)/(public)/reset-password/[id]/+page.svelte33
2 files changed, 22 insertions, 21 deletions
diff --git a/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.server.ts b/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.server.ts
index 389d04c..907b444 100644
--- a/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.server.ts
+++ b/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.server.ts
@@ -1,11 +1,11 @@
-import { is_guid } from '$lib/helpers';
-import { redirect } from '@sveltejs/kit';
-import type { PageServerLoad } from './$types';
+import {is_guid} from "$help";
+import {redirect} from "@sveltejs/kit";
+import type {PageServerLoad} from "./$types";
-export const load: PageServerLoad = async ({ params }) => {
+export const load: PageServerLoad = async ({params}) => {
const resetRequestId = params.id ?? "";
if (!is_guid(resetRequestId)) throw redirect(302, "/reset-password");
return {
- resetRequestId
+ resetRequestId,
};
}; \ No newline at end of file
diff --git a/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.svelte b/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.svelte
index ba59a8f..8f817bf 100644
--- a/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.svelte
+++ b/code/app/src/routes/(main)/(public)/reset-password/[id]/+page.svelte
@@ -1,11 +1,11 @@
<script lang="ts">
- import { onMount } from "svelte";
- import LL from "$lib/i18n/i18n-svelte";
- import { Alert, Input, Button } from "$lib/components";
- import type { PageServerData } from "./$types";
- import { goto } from "$app/navigation";
- import { SignInPageMessage, signInPageMessageQueryKey } from "$routes/(main)/(public)/sign-in";
- import { PasswordResetService } from "$lib/services/password-reset-service";
+ import {onMount} from "svelte";
+ import LL from "$i18n/i18n-svelte";
+ import {Alert, Input, Button} from "$components";
+ import type {PageServerData} from "./$types";
+ import {goto} from "$app/navigation";
+ import {SignInPageMessage, signInPageMessageQueryKey} from "$routes/(main)/(public)/sign-in";
+ import {PasswordResetService} from "$services/password-reset-service";
export let data: PageServerData;
const passwordResets = new PasswordResetService();
@@ -57,18 +57,19 @@
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
<form class="space-y-6" on:submit|preventDefault={submitFormAsync}>
{#if requestIsInvalid}
- <Alert title={$LL.resetPasswordPage.invalidRequestTitle()} message={$LL.resetPasswordPage.invalidRequestMessage()} />
+ <Alert title={$LL.resetPasswordPage.invalidRequestTitle()}
+ message={$LL.resetPasswordPage.invalidRequestMessage()}/>
{/if}
<Input
- id="password"
- name="password"
- type="password"
- autocomplete="new-password"
- required
- bind:value={formData.newPassword.value}
- label={$LL.resetPasswordPage.newPassword()}
+ id="password"
+ name="password"
+ type="password"
+ autocomplete="new-password"
+ required
+ bind:value={formData.newPassword.value}
+ label={$LL.resetPasswordPage.newPassword()}
/>
- <Button text={$LL.submit()} type="submit" {loading} fullWidth />
+ <Button text={$LL.submit()} type="submit" {loading} fullWidth/>
</form>
</div>
</div>